package top.txl.utils;

import io.jsonwebtoken.Claims;
import org.springframework.stereotype.Component;
import top.txl.entity.Category;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDateTime;

@Component
public class HandlerUpdateInfo {
    public static <T> void insert(HttpServletRequest request, T obj){
//        String jwt = request.getHeader("Authorization");
//        Claims claims = JwtUtils.parseJwt(jwt);
//        Integer id = (Integer)claims.get("id");
//        obj.setCreateTime(LocalDateTime.now());
//        obj.setUpdateTime(LocalDateTime.now());
//        obj.setCreateUser(id);
//        obj.setUpdateUser(id);

    }

    public static void edit(HttpServletRequest request, Category category){

    }
}
